export const MessageType = {
    SYSTEM_MSG: '0',
    CHAT_MSG: '1',
    APPROVAL_MSG: '2',
    APPOINTMENT_MSG: '3'
}

export const SubType = {
    SYSTEM: {
        BROADCAST: 'system_broadcast'
    },
    // 聊天
    CHAT: {
        USER_TO_USER: 'user_chat',
        USER_TO_CONSULTANT: 'consultation_chat'
    },
    // 审核
    APPROVAL: {
        REQUEST: 'approval_request',
        RESULT: 'approval_result'
    },
    // 预约
    APPOINTMENT: {
        REQUEST: 'appointment_request',
        RESULT: 'appointment_result',
        END: 'appointment_end',
    }
}

export const UserRole = {
    USER: 'common',
    CONSULTANT: 'counselor',
    ADMIN: 'admin',
    COMMONADMIN: 'commonAdmin'
}

// 映射关系
export const TypeMapping = {
    // 主类型映射
    MessageType: {
        [MessageType.SYSTEM_MSG]: '系统消息',
        [MessageType.CHAT_MSG]: '聊天消息',
        [MessageType.APPROVAL_MSG]: '审批消息',
        [MessageType.APPOINTMENT_MSG]: '预约消息'
    },

    // 子类型映射（结构化分类）
    SubType: {
        // 系统消息子类
        [SubType.SYSTEM.BROADCAST]: '系统公告',

        // 聊天消息子类
        [SubType.CHAT.USER_TO_USER]: '用户私信',
        [SubType.CHAT.USER_TO_CONSULTANT]: '咨询会话',

        // 审批流程子类
        [SubType.APPROVAL.REQUEST]: '审批申请',
        [SubType.APPROVAL.RESULT]: '审批结果',

        // 预约流程子类
        [SubType.APPOINTMENT.REQUEST]: '预约申请',
        [SubType.APPOINTMENT.RESULT]: '预约结果'
    },

    // 用户角色映射
    UserRole: {
        [UserRole.USER]: '普通用户',
        [UserRole.CONSULTANT]: '咨询师',
        [UserRole.ADMIN]: '系统管理员',
        [UserRole.COMMONADMIN]: '普通管理员'
    }
}
